
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>宏定义</title>
</head>
<body>
    {% include "index.html"%}
    {% macro input() %}
    <b>输入用户名:</b>
    <input type="text"
           name="name"
           value=""
           size="30"/>
    {% endmacro %}

    {% macro func(name,value='',type='text',size=20) %}
    <p><b>参数定义--用户名:</b></p>
        <input type="{{ type }}"
               name="{{ name }}"
               value="{{ value }}"
               size="{{ size }}"/>
    {% endmacro %}

    <h1>调用宏</h1>
    {{ input() }}
    <hr>
    {{ func(type="password") }}
</body>
</html>